package cn.com.util;

import cn.com.Enum.SessionAttr;

import javax.servlet.http.HttpServletRequest;

public class SessionUtil {

    public static void addAttr(HttpServletRequest request, SessionAttr attr, Object o){
        request.getSession().setAttribute(attr.getAttr(),o);
    }

    public static Object getAttr(HttpServletRequest request,SessionAttr attr){
        return request.getSession().getAttribute(attr.getAttr());
    }
}
